@prefix-cls: ~'@{namespace}-multiple-tabs';

html[data-theme='dark'] {
	.@{prefix-cls} {
		.ant-tabs-tab {
			border-bottom: 1px solid @border-color-base;
		}
	}
}

html[data-theme='light'] {
	.@{prefix-cls} {
		.ant-tabs-tab:not(.ant-tabs-tab-active) {
			border: 1px solid #d9d9d9 !important;
		}
	}
}

.@{prefix-cls} {
	z-index: 10;
	height: @multiple-height + 2;
	line-height: @multiple-height + 2;
	background-color: @component-background;
	border-bottom: 1px solid @border-color-base;

	.ant-tabs-small {
		height: @multiple-height;
	}

	.ant-tabs.ant-tabs-card {
		.ant-tabs-nav {
			margin: 0;

			.ant-tabs-nav-wrap {
				height: @multiple-height;
				margin: 0;
				background-color: @component-background;
				border: 0;
				box-shadow: none;
				height: @multiple-height;
			}

			.ant-tabs-tab {
				height: calc(@multiple-height - 2px);
				padding-right: 12px;
				line-height: calc(@multiple-height - 2px);
				color: @text-color-base;
				background-color: @component-background;
				transition: none;
				.ant-tabs-tab-remove {
					opacity: 0;
					width: 0;
				}
				&:hover {
					opacity: 100%;
					.ant-tabs-tab-remove {
						opacity: 100%;
					}
				}

				> div {
					display: flex;
					justify-content: center;
					align-items: center;
				}

				svg {
					fill: @text-color-base;
				}
			}

			.ant-tabs-tab:not(.ant-tabs-tab-active) {
				&:hover {
					color: @primary-color;
				}
			}

			.ant-tabs-tab-active {
				position: relative;
				padding-left: 18px;
				background: @primary-color;
				border: 0;
				transition: none;

				.ant-tabs-close-x {
					opacity: 100%;
				}

				.ant-tabs-tab-btn {
					color: @white !important;
				}

				svg {
					width: 0.7em;
					fill: @white;
				}
			}
		}

		.ant-tabs-nav > div:nth-child(1) {
			padding: 2px 6px 0;

			.ant-tabs-tab {
				margin-right: 3px !important;
			}
		}
	}

	.ant-tabs-tab:not(.ant-tabs-tab-active) {
		.anticon-close {
			font-size: 12px;

			svg {
				width: 0.6em;
			}
		}
	}

	.ant-tabs-extra-content {
		margin-top: 2px;
		line-height: @multiple-height !important;
	}

	.ant-dropdown-trigger {
		display: inline-flex;
	}

	&--hide-close {
		.ant-tabs-close-x {
			opacity: 0% !important;
		}
	}

	&-content {
		&__extra-quick,
		&__extra-redo,
		&__extra-fold {
			display: inline-block;
			width: 36px;
			height: @multiple-height;
			line-height: @multiple-height;
			color: @text-color-secondary;
			text-align: center;
			cursor: pointer;
			border-left: 1px solid @border-color-base;

			&:hover {
				color: @text-color-base;
			}

			span[role='img'] {
				transform: rotate(90deg);
			}
		}

		&__extra-redo {
			span[role='img'] {
				transform: rotate(0deg);
			}
		}

		&__info {
			display: inline-block;
			width: 100%;
			height: @multiple-height - 2;
			padding-left: 0;
			margin-left: -10px;
			font-size: 12px;
			cursor: pointer;
			user-select: none;
		}
	}
}
